# coding:utf-8
import os

'''
@描述：路径
'''
FILE_ALL_DIC = 'offline/all.dic'
FILE_TFIDF_MODEL = 'offline/tfidf.model'
FILE_USER_DIC = ['E:\work_code\self_dic.txt']
file_name_user_stop_word_dic = ['stop_words.txt']
file_name_important_words = "important_words.txt"
'''
@描述：redis配置信息
'''
REDIS_HOST = '172.16.200.94'
REDIS_PASSWORD = ''
REDIS_PORT = 6379
REDIS_DB = 10
REDIS_EXPIRE_TIME = 60 * 60 * 24 * 3

NAME_SPACE = 'nlp:'

REDIS_RECALL_HOST = '172.16.200.94'
REDIS_RECALL_PASSWORD = ''
REDIS_RECALL_PORT = 6379
REDIS_RECALL_DB = 0

'''
@描述：数据库配置信息
'''
# 大数据数据库
DB_HOST = "172.16.200.17"
DB_PORT = 3306
DB_USER = "szy"
DB_PASSWORD = "yP0tfUTHvP5q"

# 内容端数据库
DB_CONTENT_HOST = "172.16.200.17"
DB_CONTENT_PORT = 3306
DB_CONTENT_USER = "szy"
DB_CONTENT_PASSWORD = "yP0tfUTHvP5q"

# 数据库连接编码
DB_CHARSET = "utf8"
# mincached : 启动时开启的闲置连接数量(缺省值 0 以为着开始时不创建连接)
DB_MIN_CACHED = 10
# maxcached : 连接池中允许的闲置的最多连接数量(缺省值 0 代表不闲置连接池大小)
DB_MAX_CACHED = 10
# maxshared : 共享连接数允许的最大数量(缺省值 0 代表所有连接都是专用的)如果达到了最大数量,被请求为共享的连接将会被共享使用
DB_MAX_SHARED = 20
# maxconnecyions : 创建连接池的最大数量(缺省值 0 代表不限制)
DB_MAX_CONNECYIONS = 20
# blocking : 设置在连接池达到最大数量时的行为(缺省值 0 或 False 代表返回一个错误<toMany......>; 其他代表阻塞直到连接数减少,连接被分配)
DB_BLOCKING = True
# maxusage : 单个连接的最大允许复用次数(缺省值 0 或 False 代表不限制的复用).当达到最大数时,连接会自动重新连接(关闭和重新打开)
DB_MAX_USAGE = 0
# setsession : 一个可选的SQL命令列表用于准备每个会话，如["set datestyle to german", ...]
DB_SET_SESSION = ['SET AUTOCOMMIT = 1']

'''
描述nlp配置
'''

OFFLINE_DIR = 'offline'
OFFLINE_READ_LIMIT = 2000
ONLINE_READ_LIMIT = 10

DB_HOST_RECALL = "172.16.200.17"
DB_USER_RECALL = "szy"
DB_PASSWORD_RECALL = "yP0tfUTHvP5q"

REDIS_HOST_RECALL = '172.16.200.94'
REDIS_PASSWORD_RECALL = ''
REDIS_PORT_CALL = '6379'

MODEL_DIR = 'E:\work_code\model_dir'
